Class Storage#decryptFile
Storage
- Defined in: storage.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Storage#decryptFile(successCallback, errorCallback, options)
Decrypt the input file.
|
Class Detail
Storage#decryptFile(successCallback, errorCallback, options)
Decrypt the input file.
// Javascript code
function decryptFile () {
function successCb(cbObject) {
console.log("cbObject : " + JSON.stringify(cbObject));
}
function failureCb(cbObject) {
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var params = {
cipher_mode : "aes-256-cbc",
password : "test",
inputPath : "file://internal/test_enc.mp4",
outputFileName : "test.mp4"
};
var storage = new Storage();
storage.decryptFile(successCb, failureCb, params);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- {Object} options
Property Type Description Required cipher_mode String Set cipher_mode (aes-128-cbc, aes-128-ecb, aes-192-cbc, aes-192-ecb, aes-256-cbc, aes-256-ecb) required password String Set password for decryption. required inputPath String Set input file path. required outputFileName String Set output file name. required
- Since:
- 1.5
- Returns:
If the method is successfully executed, call the success callback function without a parameter. If an error occurs, failure callback function is called with failure callback object as a parameter.